/**
**************************************************************************************
*Founder Effect                                                                      *
*Copyright (C) 2006-2007, 5d Studios (www.5d-Studios.com)                            *
*                                                                                    *
*This library is free software; you can redistribute it and/or                       *
*modify it under the terms of the GNU Lesser General Public                          *
*License as published by the Free Software Foundation; either                        *
*version 2.1 of the License, or (at your option) any later version.                  *
*                                                                                    *
*This library is distributed in the hope that it will be useful,                     *
*but WITHOUT ANY WARRANTY; without even the implied warranty of                      *
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                   *
*Lesser General Public License for more details.                                     *
*                                                                                    *
*You should have received a copy of the GNU Lesser General Public                    *
*License along with this library; if not, write to the Free Software                 *
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA      *
**************************************************************************************
*/
#pragma once

#include "ISound.h"

class SoundManager : public ISound
{
public:
	SoundManager(void);

	/** Initialize the subsystem */
	int Init();
	/** Update with time elapsed */
	void Update(float deltaTime); 
	/** Close off the system */
	void Shutdown();

	/** Set the Volume of all sounds 
	 *  0 - 1.0
	 */
	void SetVolume(float v);

	/** Toggle Mute */
	void Mute(bool b);

	/** Play a music file */
	void PlayMusic( const std::string &file ); 
	/** Stop the current Music */
	void StopMusic();
	/** Resume the Music */
	void ResumeMusic();

    /** Stop all the sounds */
    void StopAll();
    /** Resume all the sounds */
    void ResumeAll();
private:
	float	m_oldVolume;

    Play_f  play_f;
    Stop_f  stop_f;
    Resume_f resume_f;
    S_dump_f sdump_f;
public:
	virtual ~SoundManager(void);
};
